package com.cskaoyan.catmall.dao;

import com.cskaoyan.catmall.model.pojo.MarketSearchHistory;
import com.cskaoyan.catmall.model.pojo.MarketSearchHistoryExample;
import com.cskaoyan.catmall.model.vo.HistoryKeywordWxVO;
import com.cskaoyan.catmall.model.vo.HistoryListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketSearchHistoryMapper {
    long countByExample(MarketSearchHistoryExample example);

    int deleteByExample(MarketSearchHistoryExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketSearchHistory record);

    int insertSelective(MarketSearchHistory record);

    List<MarketSearchHistory> selectByExample(MarketSearchHistoryExample example);

    MarketSearchHistory selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketSearchHistory record, @Param("example") MarketSearchHistoryExample example);

    int updateByExample(@Param("record") MarketSearchHistory record, @Param("example") MarketSearchHistoryExample example);

    int updateByPrimaryKeySelective(MarketSearchHistory record);

    int updateByPrimaryKey(MarketSearchHistory record);

    List<HistoryListVO> selectSearchHistorySelective(@Param("userId") Integer userId, @Param("keyword") String keyWord,
                                                     @Param("order") String order, @Param("sort") String sort);

    List<HistoryKeywordWxVO> selectByUserId(@Param("userId") int userId);

    int update(@Param("userId") int userId);
}